<template>
	<view>
		<view class="mainpadding_top ffffff flexbetween">
			<view class="titletext bold hei_text">場地名稱</view>
			<input type="text" value="" class="hei_text main_size bold" placeholder="請輸入場地名稱" style="text-align: right;" />
		</view>
		<view class="flexbetween ffffff mainpadding_top">
			<view class="hei_text titletext bold">所在地區</view>
			<uni-data-picker  @change="bindPickerChange" :localdata="items" v-model="address.county" >
				<view class="flexright">
					<input class="hei_text main_size bold" type="text" style="text-align: right;" v-model="addressdetail" placeholder="請選擇所在地址">
					<u-icon name="arrow-right" color="#999" size="16"></u-icon>
				</view>
			</uni-data-picker>
		</view>
		<view class="flexbetween ffffff mainpadding_top">
			<view class="hei_text titletext bold">詳細地址</view>
			<view class="flexright">
				<input class="hei_text main_size bold" type="text" style="text-align: right;" disabled placeholder="請選擇詳細地址">
				<u-icon name="arrow-right" color="#999" size="16"></u-icon>
			</view>
		</view>
		<view class="mainpadding_top ffffff flexbetween">
			<view class="titletext bold hei_text">場地佈局</view>
			<view class="flexright" @click="jumpurl('/pages/workbench/buju')">
				<input type="text" value="" class="hei_text main_size bold" placeholder="請選擇場地佈局" disabled style="text-align: right;" />
				<u-icon name="arrow-right" color="#999" size="16"></u-icon>
			</view>
		</view>
		<view class="mainpadding_top ffffff">
			<view class="titletext bold hei_text">場館圖（0/1）</view>
			<view class="flexleft flex_wrap">
				<view class="itemimgBox flexcenter margin_top2" v-for="item in 2"><!-- 已上传 -->
					<image class="listleftimg radius"
						src="https://xunbo.yuntaiqikeji.com/uploads/20230725/5f1a390c01eae149ad8ef40aa05efffa.jpg"
						mode=""></image>
					<view class="deleteimg"></view>
				</view>
				<view class="itemimgBox flexcenter margin_top2"><!-- 未上传 -->
					<image class="listleftimg radius" src="@/static/image/system/upimg.png" mode=""></image>
				</view>
			</view>
		</view>
		<view class="mainpadding posibottom" style="bottom: 0;">
			<view class="submitbtn">確定</view>
		</view>
	</view>
</template>

<script>
	import citys from "../../static/city/city.js"
	export default {
		data() {
			return {
				addressdetail:"",//详細地址
				address:{
					province: "", //省
					city: "", //市
					county: "", //區
				},
			}
		},
		methods: {
			bindPickerChange(val) {
				let area = val.detail.value
				let areas = [area[0].text, area[1].text, area[2].text];
				this.addressdetail = JSON.parse(JSON.stringify(areas.join("/")));
				this.address.province = area[0].value;
				this.address.city = area[1].value;
				this.address.county = area[2].value;
			},
			jumpurl(url){
				uni.navigateTo({
					url
				})
			}
		}
	}
</script>

<style>

</style>
